package functions;
import main.ContingencyTable;

public class KappaFunction extends GeneralFunction {

	public KappaFunction(String name) {
		super(name);
	}

	@Override
	public double calculate(ContingencyTable t) {
		return (t.N() * t.f11() + t.N() * t.f00() - t.f1p() * t.fp1() - t.f0p()
				* t.fp0())
				/ (t.N() * t.N() - t.f1p() * t.fp1() - t.f0p() * t.fp0());
	}

}
